tests/installed: Disable all rpmmd repos
authorColin Walters <walters@verbum.org>
Wed, 9 May 2018 14:46:37 +0000 (07:46 -0700)
committerAtomic Bot <atomic-devel@projectatomic.io>
Fri, 11 May 2018 12:39:17 +0000 (12:39 +0000)
For the same reason we do in the rpm-ostree tests.  This also
made sure the test run worked when I was offline on a plane.

Closes: #1583
Approved by: jlebon

tests/installed/destructive-ansible.yml
tests/installed/tasks/disable-all-rpmmd-repos.yml [new file with mode: 0644]

index 12ee5d528b467944f4406f18e33d3e3609cca2be..a0e69aa16e745c80eebf9f0581aacc7b45533fa7 100644 (file)
@@ -8,6 +8,7 @@
     use_git_build: True
     tests: "."
   tasks:
+    - import_tasks: tasks/disable-all-rpmmd-repos.yml
     - import_tasks: tasks/query-host.yml
     - set_fact:
         rpmostree_initial_deployment: "{{ rpmostree_status[\"deployments\"][0] }}"
diff --git a/tests/installed/tasks/disable-all-rpmmd-repos.yml b/tests/installed/tasks/disable-all-rpmmd-repos.yml
new file mode 100644 (file)
index 0000000..b4f2a07
--- /dev/null
@@ -0,0 +1,5 @@
+- name: Disable all rpmmd repos
+  shell: |
+    for x in /etc/yum.repos.d/*.repo; do
+      sed -i -e 's,^enabled=,enabled=0,g' $x
+    done